﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using Medical.DataInterface;
using Medical.Entity;

namespace Medical.Data
{
    /// <summary>
    /// 文章属性数据操作类
    /// </summary>
    public sealed class ArticleMetaAccessor : IArticleMetaAccessor
    {
        #region IArticleMetaAccessor 成员
        /// <summary>
        /// 获取文章属性列表
        /// </summary>
        /// <param name="nType"></param>
        /// <returns></returns>
        public DataTable GetList(int nType)
        {
            return SqlHelper.ExecuteDataset(
                  SqlHelper.database,
                  CommandType.Text,
                  "select [ID] [ArticleMetaID],[Name] from [ArticleMeta] where [Type]=@Type order by [OrderNum]",
                  new SqlParameter("@Type", nType)).Tables[0];
        }

        #endregion

        #region IBaseAccessor<ArticleMeta> 成员

        public ArticleMeta Get(int nID)
        {
            throw new NotImplementedException();
        }

        public bool Insert(ArticleMeta Info)
        {
            throw new NotImplementedException();
        }

        public bool Update(ArticleMeta Info)
        {
            throw new NotImplementedException();
        }

        public bool Delete(int nID)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
